import { AxiosRequestConfig } from "axios"

export interface UserRequestConfig {
  loading?: boolean
  force?: boolean
  cache?: boolean | 'memory' | 'session' | 'local'
  cacheExpires?: number
  isUpload?: boolean
  allowRepeat?: boolean
  pathData?: Record<string, any>
}

export type UserConfig = AxiosRequestConfig & UserRequestConfig

export type ApiConfig = {
  name: string
  module: string
  config: {
    url: string
    method: 'get' | 'post' | 'put' | 'delete' | 'patch'
  }
  isUpload: boolean
}
